@section('meta')
    <style>
        body{background-color: #fff;}
        .modal-content{display: unset;}
        .layui-form-label {width: 100px;}
        .layui-input-block {margin-left: 138px;}
        .layui-input, .layui-textarea {width: 86%;}
        .layui-form-select .layui-edge {right: 16%;}
        .layui-form-select dl {min-width: 86%;}
        .layui-input.layui-bg-gray {line-height: 38px;}
        .new-table {margin: 20px 0;}
        .new-table .selector-title {line-height: 36px;text-align: left;padding-left: 15px;font-size: 16px;font-weight: bold;color: #018164;margin: 20px 0;border-bottom: 1px solid #28b28a;}
    </style>
@endsection
@include('Home.User.Common._meta')
<!----  新增： 薪酬  ---->
<div class="modal-content new-table" id="addNew-content2">
    <form class="layui-form modal-client-info" action="" id="form-user" lay-filter="form-user">
        <div class="modal-func-btns">
            @if (Auth::user()->hasRole('admin'))
                <a href="javascript:;" class="modal-save-btn" onclick="subForm('{{route('salary_edit',$obj->id)}}')" title="保存"><i class="icon icon-save"></i></a>
            @endif
            <a href="javascript:location.replace(location.href);" class="modal-edit-btn" title="重置"><i class="icon icon-edit"></i></a>
        </div>
        @include('Home.User.Common._msg')
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>职级</label>
            <div class="layui-input-block">
                @if(Auth::user()->hasAnyRole(['admin']))
                    <input type="text" name="rank" lay-verify="required" placeholder="请输入职级" value="{{$obj->rank}}" autocomplete="off" class="layui-input">
                @else
                    <div class="layui-input layui-bg-gray">{{$obj->rank}}</div>
                @endif
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>基础薪资</label>
            <div class="layui-input-block">
                @if(Auth::user()->hasAnyRole(['admin']))
                    <input type="text" name="salary" lay-verify="required" placeholder="请输入基础薪资" value="{{$obj->salary}}" autocomplete="off" class="layui-input">
                @else
                    <div class="layui-input layui-bg-gray">{{$obj->salary}}</div>
                @endif
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"><span class="red">*</span>薪资月份</label>
            <div class="layui-input-block">
                @if(Auth::user()->hasAnyRole(['admin']))
                    <input type="text" id="month" name="month" value="{{$obj->month}}" lay-verify="required" placeholder="请输入" autocomplete="off" class="layui-input">
                @else
                    <div class="layui-input layui-bg-gray">{{$obj->month}}</div>
                @endif
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">KPI结果</label>
            <div class="layui-input-block">
                @if(Auth::user()->hasAnyRole(['admin']))
                    <input type="text" name="kpi_result" value="{{$obj->kpi_result}}" lay-verify="required" placeholder="请输入" value="" autocomplete="off" class="layui-input">
                @else
                    <div class="layui-input layui-bg-gray">{{$obj->kpi_result}}</div>
                @endif
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">KPI奖金</label>
            <div class="layui-input-block">
                @if(Auth::user()->hasAnyRole(['admin']))
                    <input type="text" name="kpi_bonus" value="{{$obj->kpi_bonus}}" lay-verify="" placeholder="请输入" value="" autocomplete="off" class="layui-input">
                @else
                    <div class="layui-input layui-bg-gray">{{$obj->kpi_bonus}}</div>
                @endif
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">KPI提成(业务)</label>
            <div class="layui-input-block">
                @if(Auth::user()->hasAnyRole(['admin']))
                    <input type="text" name="kpi_money" value="{{$obj->kpi_money}}" lay-verify="" placeholder="请输入" value="" autocomplete="off" class="layui-input">
                @else
                    <div class="layui-input layui-bg-gray">{{$obj->kpi_money}}</div>
                @endif
            </div>
        </div>
        <!--薪资加项明细-->
        <div class="selector-title">薪资加项明细</div>
        <table class="layui-table">
            <thead>
            <tr>
                <th>加班费</th>
                <th>推荐奖金</th>
                <th>节庆礼金</th>
                <th>生日礼金</th>
                <th>房补</th>
                <th>餐补</th>
                <th>话费补贴</th>
                <th>入职机票</th>
                <th>入职签证</th>
                <th>年假折现</th>
                <th>年度机票</th>
                <th>年度医补</th>
                <th>13薪基数</th>
                <th>年度13薪</th>
                <th>其他补发</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td data-label="加班费">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money1" value="{{$obj->add_money1}}" class="layui-input"> @else {{$obj->add_money1}} @endif</td>
                <td data-label="推荐奖金">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money2" value="{{$obj->add_money2}}" class="layui-input"> @else {{$obj->add_money2}} @endif</td>
                <td data-label="节庆礼金">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money3" value="{{$obj->add_money3}}" class="layui-input"> @else {{$obj->add_money3}} @endif</td>
                <td data-label="生日礼金">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money4" value="{{$obj->add_money4}}" class="layui-input"> @else {{$obj->add_money4}} @endif</td>
                <td data-label="房补">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money5" value="{{$obj->add_money5}}" class="layui-input"> @else {{$obj->add_money5}} @endif</td>
                <td data-label="餐补">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money6" value="{{$obj->add_money6}}" class="layui-input"> @else {{$obj->add_money6}} @endif</td>
                <td data-label="话费补贴">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money7" value="{{$obj->add_money7}}" class="layui-input"> @else {{$obj->add_money7}} @endif</td>
                <td data-label="入职机票">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money8" value="{{$obj->add_money8}}" class="layui-input"> @else {{$obj->add_money8}} @endif</td>
                <td data-label="入职签证">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money9" value="{{$obj->add_money9}}" class="layui-input"> @else {{$obj->add_money9}} @endif</td>
                <td data-label="年假折现">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money10" value="{{$obj->add_money10}}" class="layui-input"> @else {{$obj->add_money10}} @endif</td>
                <td data-label="年度机票">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money11" value="{{$obj->add_money11}}" class="layui-input"> @else {{$obj->add_money11}} @endif</td>
                <td data-label="年度医补">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money12" value="{{$obj->add_money12}}" class="layui-input"> @else {{$obj->add_money12}} @endif</td>
                <td data-label="13薪基数">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_option1" value="{{$obj->add_option1}}" class="layui-input"> @else {{$obj->add_option1}} @endif</td>
                <td data-label="年度13薪">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money13" value="{{$obj->add_money13}}" class="layui-input"> @else {{$obj->add_money13}} @endif</td>
                <td data-label="其他补发">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="add_money14" value="{{$obj->add_money14}}" class="layui-input"> @else {{$obj->add_money14}} @endif</td>
            </tr>
            </tbody>
        </table>

        <!--薪资扣款明细-->
        <div class="selector-title">薪资扣款明细</div>
        <table class="layui-table">
            <thead>
            <tr>
                <th>总出勤数</th>
                <th>实际出勤</th>
                <th>迟到次数</th>
                <th>迟到扣款</th>
                <th>病假天数</th>
                <th>病假扣款</th>
                <th>事假天数</th>
                <th>事假扣款</th>
                <th>旷工天数</th>
                <th>旷工扣款</th>
                <th>房租扣款</th>
                <th>水电费</th>
                <th>网费</th>
                <th>五险一金</th>
                <th>其他扣款</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td data-label="总出勤数">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_option1" value="{{$obj->cut_option1}}" class="layui-input"> @else {{$obj->cut_option1}} @endif</td>
                <td data-label="实际出勤">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_option2" value="{{$obj->cut_option2}}" class="layui-input"> @else {{$obj->cut_option2}} @endif</td>
                <td data-label="迟到次数">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_option3" value="{{$obj->cut_option3}}" class="layui-input"> @else {{$obj->cut_option3}} @endif</td>
                <td data-label="迟到扣款">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_money1" value="{{$obj->cut_money1}}" class="layui-input"> @else {{$obj->cut_money1}} @endif</td>
                <td data-label="病假天数">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_option4" value="{{$obj->cut_option4}}" class="layui-input"> @else {{$obj->cut_option4}} @endif</td>
                <td data-label="病假扣款">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_money2" value="{{$obj->cut_money2}}" class="layui-input"> @else {{$obj->cut_money2}} @endif</td>
                <td data-label="事假天数">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_option5" value="{{$obj->cut_option5}}" class="layui-input"> @else {{$obj->cut_option5}} @endif</td>
                <td data-label="事假扣款">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_money3" value="{{$obj->cut_money3}}" class="layui-input"> @else {{$obj->cut_money3}} @endif</td>
                <td data-label="旷工天数">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_option6" value="{{$obj->cut_option6}}" class="layui-input"> @else {{$obj->cut_option6}} @endif</td>
                <td data-label="旷工扣款">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_money4" value="{{$obj->cut_money4}}" class="layui-input"> @else {{$obj->cut_money4}} @endif</td>
                <td data-label="房租扣款">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_money5" value="{{$obj->cut_money5}}" class="layui-input"> @else {{$obj->cut_money5}} @endif</td>
                <td data-label="水电费">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_money6" value="{{$obj->cut_money6}}" class="layui-input"> @else {{$obj->cut_money6}} @endif</td>
                <td data-label="网费">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_money7" value="{{$obj->cut_money7}}" class="layui-input"> @else {{$obj->cut_money7}} @endif</td>
                <td data-label="五险一金">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_money8" value="{{$obj->cut_money8}}" class="layui-input"> @else {{$obj->cut_money8}} @endif</td>
                <td data-label="其他扣款">@if(Auth::user()->hasAnyRole(['admin'])) <input type="text" name="cut_money9" value="{{$obj->cut_money9}}" class="layui-input"> @else {{$obj->cut_money9}} @endif</td>
            </tr>
            </tbody>
        </table>
    </form>
</div>
@section('footer')
    <script>
        layui.use(['laydate','form'], function(){
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#month', //指定元素
                type: 'month'
            });
        });
    </script>
@endsection
@include('Home.User.Common._footer')
@include('Home.User.Common._form')